package com.yanjue.client;

import com.yanjue.common.entity.Book;
import com.yanjue.common.util.Result;
import com.yanjue.fallback.BookClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * 图书客户端feign接口
 */
@FeignClient(contextId = "book", name = "light-reading-cloud-book", fallbackFactory = BookClientFallBack.class)
public interface BookClient {

    //提供的接口
    @RequestMapping("/book/getBookById")
    Result<Book> getBookById(@RequestParam("bookId") String bookId);

}